# coding=utf-8
# author=haishan09@gmail.com
from django.contrib import admin
from cube.models import Provider, Cube
from cube.forms import ProviderForm, CubeForm


class ProviderAdmin(admin.ModelAdmin):

    model = Provider

    def get_form(self, request, obj=None, **kwargs):
        return ProviderForm


class CubeAdmin(admin.ModelAdmin):

    model = Cube

    def get_form(self, request, obj=None, **kwargs):
        return CubeForm


admin.site.register(Provider, ProviderAdmin)
admin.site.register(Cube, CubeAdmin)
